package edu.hunau.cxb19.oop.class31;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 *
 * @author hb
 *
 *         2020-04-16 16:13:36
 */
public class ThreadPoolTest {

	public static void main(String[] args) {
		ExecutorService pool = Executors.newFixedThreadPool(2);

		for (int i = 0; i < 5; i++) {
			pool.execute(() -> {
				System.out.println(Thread.currentThread().getName());
			});
		}
		pool.shutdown();
	}
}
